/**
 * Import the Nerdfonts icon font.
 * Ref https://www.nerdfonts.com/cheat-sheet for a cheatsheet of available Nerdfonts icons.
 */
@import 'https://www.nerdfonts.com/assets/css/webfont.css';

:root {
  --text-size: 12px;
  --icon-size: 12px;

  --text-color-light: rgba(0 0 0 / 95%);
  --text-color-dark: rgba(255 255 255 / 95%);

  --icon-color-light: LightSteelBlue;
  --icon-color-dark: rgba(115 130 175 / 95%);

  --background-color-light: rgba(238 238 238 / 90%);
  --background-color-dark: linear-gradient(
    rgb(0 0 0 / 90%),
    rgb(5 2 20 / 85%)
  );
}

@media (prefers-color-scheme: light) {
  body {
    color: var(--text-color-light);
  }

  i {
    color: var(--icon-color-light);
  }

  #root {
    background: var(--background-color-light);
  }
}

@media (prefers-color-scheme: dark) {
  body {
    color: var(--text-color-dark);
  }

  i {
    color: var(--icon-color-dark);
  }

  #root {
    background: var(--background-color-dark);
  }
}

i {
  margin-right: 7px;
  font-size: var(--icon-size);
}

body {
  font-family: ui-monospace, monospace;
  font-size: var(--text-size);
  overflow: hidden;
}

div,
span,
p {
  cursor: default;
  user-select: none;
}

html,
body,
#root {
  height: 100%;
}

#root {
  border-bottom: 1px solid rgb(255 255 255 / 5%);
}

.app {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  height: 100%;
  padding: 4px 1.5vw;
}

.left,
.center,
.right {
  display: flex;
  align-items: center;
}

.center {
  justify-self: center;
}

.right {
  justify-self: end;
}

.logo,
.binding-mode,
.tiling-direction,
.paused-button,
.network,
.memory,
.cpu,
.battery {
  margin-right: 20px;
}

.workspaces {
  display: flex;
  align-items: center;
}

.workspace {
  background: rgb(255 255 255 / 5%);
  margin-right: 4px;
  padding: 4px 8px;
  color: rgb(255 255 255 / 90%);
  border: none;
  border-radius: 2px;
  cursor: pointer;

  &.displayed {
    background: rgb(255 255 255 / 15%);
  }

  &.focused,
  &:hover {
    background: rgb(75 115 255 / 50%);
  }
}

.binding-mode,
.tiling-direction,
.paused-button {
  background: rgb(255 255 255 / 15%);
  color: rgb(255 255 255 / 90%);
  border-radius: 2px;
  line-height: 1;
  padding: 4px 8px;
  border: 0;
  cursor: pointer;
}

.binding-mode {
  margin-right: 4px;
}

.cpu .high-usage {
  color: #900029;
}

.battery {
  position: relative;
}

.battery .charging-icon {
  position: absolute;
  font-size: 7px;
  left: -8px;
  top: 3px;
}
